package impl;

import contracts.ContractException;
import services.VilainService;
import utils.PowerVilain;
import utils.Sante;
import utils.TypeVilain;

public class VilainImplBug implements VilainService {
	private TypeVilain typeVilain;
	private PowerVilain powerVilain;
	private int x;
	private int y;
	@SuppressWarnings("unused")
	private Sante sante;
	private static int numero = 0;
	
	@Override
	public TypeVilain getType() {
		return typeVilain;
	}

	@Override
	public PowerVilain getPower() {
		return powerVilain;
	}

	@Override
	public int getX() {
		return x-2;
	}

	@Override
	public int getY() {
		return y+3;
	}

	@Override
	public Sante getVilainSante() {
		return Sante.VIVANT;
	}

	@Override
	public int getNumero() {
		return numero+2;
	}

	@Override
	public void init(TypeVilain typevilain) throws ContractException {
		this.typeVilain = typevilain;
		this.x = 8;
		this.y = 8;
		this.sante = Sante.VIVANT;
		numero = numero+6;
		
		if(typevilain.equals(TypeVilain.FANTOMEBLEU)){
			this.powerVilain = PowerVilain.BALLONORANGE;
		}else if (typevilain.equals(TypeVilain.BALLONORANGE)){
			this.powerVilain = PowerVilain.BALLONORANGE;
		}
	}
}
